package de.sonnentempel.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridBagLayout;
import org.jdesktop.swingx.JXLabel;
import java.awt.GridBagConstraints;
import org.jdesktop.swingx.JXTextField;
import java.awt.Insets;
import org.jdesktop.swingx.JXButton;
import net.miginfocom.swing.MigLayout;
import org.jdesktop.swingx.JXTitledSeparator;
import org.jdesktop.swingx.JXEditorPane;
import org.jdesktop.swingx.JXTextArea;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;

public class KundeView extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					KundeView frame = new KundeView();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public KundeView() {
		setTitle("Kunde Bearbeiten");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 400, 250);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new MigLayout("", "[left][300px]", "[][][][fill][]"));
		
		JXLabel lblVorname = new JXLabel();
		lblVorname.setText("Vorname");
		contentPane.add(lblVorname, "cell 0 0");
		
		JXTextField textField = new JXTextField();
		contentPane.add(textField, "cell 1 0,growx");
		
		JXLabel lblNachname = new JXLabel();
		lblNachname.setText("Nachname");
		contentPane.add(lblNachname, "cell 0 1");
		
		JXTextField textField_1 = new JXTextField();
		contentPane.add(textField_1, "cell 1 1,growx");
		
		JXTitledSeparator titledSeparator = new JXTitledSeparator();
		titledSeparator.setTitle("Anmerkungen");
		contentPane.add(titledSeparator, "cell 0 2 2 1,growx");
		
		JScrollPane scrollPane = new JScrollPane();
		contentPane.add(scrollPane, "cell 0 3 2 1,grow");
		
		JXTextArea textArea = new JXTextArea();
		textArea.setLineWrap(true);
		scrollPane.setViewportView(textArea);
		textArea.setWrapStyleWord(true);
		textArea.setRows(5);
		
		JXButton btnSpeichern = new JXButton();
		btnSpeichern.setText("Speichern");
		contentPane.add(btnSpeichern, "flowx,cell 1 4,growx");
		
		JXButton btnAbbrechen = new JXButton();
		btnAbbrechen.setText("Abbrechen");
		contentPane.add(btnAbbrechen, "cell 1 4,growx");
		
	}

}
